#ifndef DLGSTRINGEDIT_H
#define DLGSTRINGEDIT_H

#include <QDialog>
#include <QDoubleValidator>

namespace Ui {
    class DlgStringEdit;
}

class DlgStringEdit : public QDialog
{
    Q_OBJECT
    bool m_data_changed;
    QDoubleValidator * mp_dval;
    int m_mode;
    bool m_date_reset;
public:
    explicit DlgStringEdit(QWidget *parent = 0);
    ~DlgStringEdit();
void set_data(const QString & qstr_edit, const QString & qstr_label, const QString &qstr_title = QString());
void set_double_validator();
void set_date_editor();
QString get_data();
QDate   get_date_data();
inline bool is_changed() {return m_data_changed;}
private:
    Ui::DlgStringEdit *ui;
private slots:
    void data_changed() {m_data_changed = true;}
    void clear_date();
};

#endif // DLGSTRINGEDIT_H
